<!DOCTYPE html>
<html>
<#include "../head.html">
<body>
<table class="mc">
    <tr>
        <td class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                <!--管理员信息---}-->
                <div class="nav-wrap">
                    <#include "left.html">
                </div>
            </div>
            <!--左侧导航---}-->
        </td>
        <td class="mc-m">
            <div class="navToggle"></div>
        </td>
        <td class="mc-r">
            <!--顶部导航---{-->
            <#include "../topNav.html">
            <!--顶部导航---}-->

            <!--面包屑导航---{-->
             <#assign moduleName="流标">
            <#include "banner.html">
            <!--面包屑导航---}-->

            <!--工具栏--{-->
            <div id="toolbar" class="clearfix">
            <!--  v1.6.6.1 action里没写导出的方法    zza 2013-09-25 start
	            <#if borrowType??&&borrowType=="full"||borrowType=="all">
	            <input type="button" onclick="exportxls()" value="导出报表" class="input-button export-btn"/>
	            </#if>
	        -->
	           	<div class="toolbor-module search">
	                  <input type="button" value="搜索" class="input-button" onclick="sousuo();">
	            </div>
	            <div class="toolbor-module search">
	                <div style="height:22px;line-height:22px;float:left;">类型：</div>
	               <div class="select-box" id="type">
	                    <div class="tag-select">全部</div>
	                    <ul class="tag-options">
                        <!-- v1.6.6.1 RDPROJECT-64 zza 2013-09-25 start -->
                           <li data-value="0" <#if type==0 >data-selected="selected"</#if> class="open-selected">全部</li>
                           <li data-value="1" <#if type==1 >data-selected="selected"</#if>>秒还标</li>
                           <li data-value="2" <#if type==2 >data-selected="selected"</#if>>信用标</li>
                           <li data-value="3" <#if type==3 >data-selected="selected"</#if>>抵押标</li>
                           <li data-value="4" <#if type==4 >data-selected="selected"</#if>>净值标</li>
                           <li data-value="12" <#if type==12 >data-selected="selected"</#if>>担保标</li>
                           <li data-value="10" <#if type==10 >data-selected="selected"</#if>>流转标</li>
                        <!-- v1.6.6.1 RDPROJECT-64 zza 2013-09-25 end -->
                        </ul>
	                </div>
	            </div>
	            <div class="toolbor-module search">
	                <div style="height:22px;line-height:22px;float:left;">发布时间：</div>
	                <input class="_search-value js-datetime" name="dotime1" id="dotime1" value="" size="15"/>
	                <div style="height:22px;line-height:22px;float:left;margin:0 8px;"> 到 </div>
	                <input class="_search-value js-datetime" name="dotime2" id="dotime2"  value=""  size="15"/>
	            </div>
	            <div class="toolbor-module search">
	                   <input type="text" name="username" id="username" value="请输入用户名" data-value="请输入用户名" class="search-value">
	           	</div>
            </div>
                
            <!--工具栏--}-->

            <div id="main" class="clearfix">
                <form action="" method="post">
                    <table class="data-list">
                        <tr class="header">
                            <td>ID</td>
                            <td>用户名称</td>
                            <td>用户积分</td>
                            <td>借款标题</td>
                            <td>借款金额</td>
                            <td>最小认购单位</td>
                            <td>利率</td>
                            <td>借款期限</td>
                            <td>发布时间</td>
                            <td>投标记录</td>
                            <td>状态</td>
                            <td>操作</td>
                        </tr>
                        <#import "../../common/function.html" as func>
                            <#list list as item>
                                <tr class="s">
                                    <td>${(item.id!)?c}</td>
                                    <td>
                                        <a href="javascript:void(0)" onclick='alertPop("用户详细信息查看","url:get?${request.getContextPath()}/admin/attestation/viewUserInfo.html?username=${item.username!}",500,230,"true","","true","text")'>
                                            ${item.username!}
                                        </a>
                                    </td>
                                    <td>${item.credit_jifen!0}分</td>
                                    <td title="${item.name}" class="tal">
                                        <span style="color:#FF0000">【<@func.borrowTypeName item=item /> 】</span>
                                        <a href="${request.getContextPath()}/invest/detail.html?borrowid=${item.id?c}" target="_blank">${item.name!}</a>
                                    </td>
                                    <td>${item.account!0}元</td>
                                    <#if item.type==110>
                                        <td>${item.flow_money!0}元</td>
                                        <#else><td>-</td>
                                    </#if>

                                    <td>${item.apr!}%</td>
                                    <td><#if item.isday==1>${item.time_limit_day!"-"}天<#else>${item.time_limit!"-"}个月</#if></td>
                                    <td>${dateformat(item.addtime!)}</td>
                                    <td><a href="${webroot}/admin/borrow/tenderlist.html?borrow_id=${item.id?c}">查看</a></td>
                                    <#assign status=item.status!(-1)>
                                        <!-- v1.6.6.1 zza 2013-10-11 start -->
                                        <td><@func.statusTypeName status=item.status item=item/></td>
                                        <!-- v1.6.6.1 zza 2013-10-11 end -->
                                        <td>
                                            <#if item.type==110>
                                               <#if status==8>
                                               <#else>
                                               <!-- v1.6.7.2 RDPROJECT-618 lx 2013-12-23 start -->
                                               <a href="javascript:;" class="un" onClick="javascript:if(confirm('确定要停止流转吗?')) location.href='${request.getContextPath()}/admin/borrow/stopflow.html?borrow_id=${item.id?c}'">停止流转</a>
                                               <!-- <a class="un" href="${request.getContextPath()}/admin/borrow/stopflow.html?borrow_id=${item.id?c}">停止流转</a> -->
                                               <!-- v1.6.7.2 RDPROJECT-618 lx 2013-12-23 end -->
                                               </#if>
                                                <#elseif item.type!=110>
                                            </#if>
                                            <#if item.type!=110>
                                                <#if status==2||status==4||status==0||status==1>
                                                    <a href="javascript:;" class="un" onClick="javascript:if(confirm('确定要删除吗?删除后将不可恢复')) location.href='cancelBorrow.html?id=${item.id?c}'">撤回</a>
                                                </#if></#if>
                                            <a class="un" href="${request.getContextPath()}/admin/borrow/viewBorrow.html?id=${item.id?c}" >查看</a>
                                        </td>
                                </tr>
                            </#list>
                    </table>
                    <input type="hidden" id="borrowType" value="${borrowType}">
                </form>

                <!--底部工具栏--{-->
                <div id="bottomToolbar" class="clearfix">
                    <div class="other-tool">
                        <dl class="refresh-data">
                            <dt class="refresh-data-icon"></dt>
                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                        </dl>
                    </div>

                    <!--翻页系统--{-->
                    <div class="container">
                        <#import "../../common/page.html" as pager>
                            <@pager.pagination page=page url=currentUrl map=param style="style1" />
                    </div>
                    <!--翻页系统--}-->
                </div>
                <!--底部工具栏--}-->

                <script>
                    var urls = '?search=true';
                    var t = $("#borrowType").val();
                    if(t == "full"){
                    	 var xlsurl = 'showSpredBorrow.html?type=export';
                    }else if(t == "all"){
                    	 var xlsurl = 'showSpredBorrow.html?type=export';
                    }
                    function sousuo(){
                        var sou = "";
                        var username = $("#username").val();
                        if (username!=null&&username!=""&&username!="undefine"&&username!="请输入用户名"){
                            sou += "&username="+username;
                        }
                        var dotime1 = $("#dotime1").val();
    					if (dotime1!=null&&dotime1!=""&&dotime1!="undefine"){
    						sou += "&dotime1="+dotime1;
    					}
    					var dotime2 = $("#dotime2").val();
    					if (dotime2!=null&&dotime2!=""&&dotime2!="undefine"){
    						sou += "&dotime2="+dotime2;
    					}
    					var type = $("#type").find(".open-selected").attr("data-value");
                        if (type!=null&&type!=""&&type!="undefine"){
                            sou += "&type="+type;
                        }
                        var url=urls+sou
                        location.href=url;
                    }
                    function exportxls(){
                    	var sou = "";
                        var username = $("#username").val();
                        if (username!=null&&username!=""&&username!="undefine"&&username!="请输入用户名"){
                            sou += "&username="+username;
                        }
                        var dotime1 = $("#dotime1").val();
     					if (dotime1!=null&&dotime1!=""&&dotime1!="undefine"){
     						sou += "&dotime1="+dotime1;
     					}
     					var dotime2 = $("#dotime2").val();
     					if (dotime2!=null&&dotime2!=""&&dotime2!="undefine"){
     						sou += "&dotime2="+dotime2;
     					}
     					var type = $("#type").val();
    					if (type!=null&&type!=""&&type!="undefine"){
    						sou += "&type="+type;
    					}
    					var type = $("#type").find(".open-selected").attr("data-value");
                        if (type!=null&&type!=""&&type!="undefine"){
                            sou += "&type="+type;
                        }
     					if (sou!=""){
                            location.href=xlsurl+sou;
                        }else{
                            location.href=xlsurl;
                        }
                    }
                </script>
            </div>

        </td>
    </tr>
    <tr>
        <!--尾部--{-->
        <td colspan="3" class="mc-b"><#include "../foot.html"></td>
        <!--尾部--}-->
    </tr>
</table>

</body>
</html>
<#include "../jsPage.html">
